import request from '@/utils/request'

// 上传文件
export const uploadFile = (data) => {
    return request({
        url: '/uplaod/uploadFile',
        method: 'post',
        headers: {
            "Content-Type": "multipart/form-data",
        },
        data: data
    })
}
// 添加更新包
export const addFirmwareMsg = (data) => {
    return request({
        url: '/ylLevelFirmwareMsg/addFirmwareMsg',
        method: 'post',
        data
    })
}
// 修改更新包
export const updateFirmwareMsg = (data) => {
    return request({
        url: '/ylLevelFirmwareMsg/updateFirmwareMsg',
        method: 'post',
        data
    })
}
// 删除更新包
export const delFirmwareMsg = (data) => {
    return request({
        url: '/ylLevelFirmwareMsg/delFirmwareMsg',
        method: 'post',
        data
    })
}
// ota查询详情
export const findFirmwareDetail = (data) => {
    return request({
        url: '/ylLevelFirmwareMsg/findFirmwareDetail',
        method: 'post',
        data
    })
}
// 修改OTA状态
export const ylLevelFirmwareMsgupdateState = (data) => {
    return request({
        url: '/ylLevelFirmwareMsg/updateState',
        method: 'post',
        data
    })
}

// 获取更新包列表
export const findFirmwareByPage = (data) => {
    return request({
        url: '/ylLevelFirmwareMsg/findFirmwareByPage',
        method: 'post',
        data
    })
}
// 吸气量呼气量数据记录表 根据时间段和用户获取rer值
export const ylLevelInhaleRecordRerList = (params) => {
    return request({
        url: '/ylLevelInhaleRecord/rerList',
        method: 'get',
        params
    })
}
// 吸气量呼气量数据记录表 根据时间段和用户获取传感器数据
export const ylLevelInhaleRecordSensorList = (params) => {
    return request({
        url: '/ylLevelInhaleRecord/sensorList',
        method: 'get',
        params
    })
}

// 用户设备管理 获取用户设备绑定记录
export const getUserBindDevice = (data) => {
    return request({
        url: '/ylLevelUserDevice/getUserBindDevice',
        method: 'post',
        data
    })
}

// 用户设备管理 设备解绑
export const ylLevelUserDeviceUserBindDevice = (data) => {
    return request({
        url: '/ylLevelUserDevice/userBindDevice',
        method: 'post',
        data
    })
}

// 音频 start
// 获取列表
export const ylLevelVideoList = (params) => {
    return request({
        url: '/ylLevelVideo/list',
        method: 'get',
        params
    })
}
// 添加
export const ylLevelVideoAdd = (data) => {
    return request({
        url: '/ylLevelVideo/add',
        method: 'post',
        data
    })
}
// 修改
export const ylLevelVideoUpdate = (data) => {
    return request({
        url: '/ylLevelVideo/update',
        method: 'post',
        data
    })
}
// 删除
export const ylLevelVideoUpdatedel = (data) => {
    return request({
        url: '/ylLevelVideo/updatedel',
        method: 'post',
        data
    })
}
// 阿里云视频上传
export const uploadAliyunVideo = (data) => {
    return request({
        url: '/AliyunVideo/uploadAliyunVideo',
        method: 'post',
        headers: {
            "Content-Type": "multipart/form-data",
        },
        data
    })
}
// 根据视频id获取视频播放地址
export const getVideoUrl = (params) => {
    return request({
        url: '/AliyunVideo/getVideoUrl',
        method: 'get',
        params
    })
}
// 音频 end
// 客服回复 start
//查询反馈内容详情
export const findFeedbackDetail = (params) => {
    return request({
        url: '/ylServiceReply/findFeedbackDetail',
        method: 'get',
        params
    })
}
//获取用户反馈列表
export const findFeedbackList = (data) => {
    return request({
        url: '/ylServiceReply/findFeedbackList',
        method: 'post',
        data
    })
}
//反馈回复
export const feedbackReply = (data) => {
    return request({
        url: '/ylServiceReply/feedbackReply',
        method: 'post',
        data
    })
}
//反馈类型
export const findFeedbackType = (params) => {
    return request({
        url: '/ylServiceReply/findFeedbackType',
        method: 'get',
        params
    })
}
// 客服回复 end
// 文章管理 start
// 查询菜单列表
export const findMenuList = (data) => {
    return request({
        url: '/ylLevelArticle/findMenuList',
        method: 'post',
        data
    })
}
// 添加菜单
export const addMenu = (data) => {
    return request({
        url: '/ylLevelArticle/addMenu',
        method: 'post',
        data
    })
}
// 删除菜单
export const delMenu = (data) => {
    return request({
        url: '/ylLevelArticle/delMenu',
        method: 'post',
        data
    })
}
// 修改菜单
export const updateMenu = (data) => {
    return request({
        url: '/ylLevelArticle/updateMenu',
        method: 'post',
        data
    })
}
// 文章上传
export const addArticle = (data) => {
    return request({
        url: '/ylLevelArticle/addArticle',
        method: 'post',
        data
    })
}
// 查询文章列表
export const findArticleList = (data) => {
    return request({
        url: '/ylLevelArticle/findArticleList',
        method: 'post',
        data
    })
}
// 查询文章详情
export const findArticleDetail = (data) => {
    return request({
        url: '/ylLevelArticle/findArticleDetail',
        method: 'post',
        data
    })
}
// 更新文章
export const updateArticle = (data) => {
    return request({
        url: '/ylLevelArticle/updateArticle',
        method: 'post',
        data
    })
}
// 删除文章
export const delArticleById = (data) => {
    return request({
        url: '/ylLevelArticle/delArticleById',
        method: 'post',
        data
    })
}
// 文章上架下架
export const updateState = (data) => {
    return request({
        url: '/ylLevelArticle/updateState',
        method: 'post',
        data
    })
}

// rer文章start
// 添加文章
export const ylLevelMeasureAddArticle = (data) => {
    return request({
        url: '/ylLevelMeasure/addArticle',
        method: 'post',
        data
    })
}
// 查询标签
export const getTag = (params) => {
    return request({
        url: '/ylLevelMeasure/getTag',
        method: 'get',
        params
    })
}
// 查询文章列表
export const findArticleByPage = (data) => {
    return request({
        url: '/ylLevelMeasure/findArticleByPage',
        method: 'post',
        data
    })
}
// 查询文章详情
export const ylLevelMeasurefindArticleDetail = (data) => {
    return request({
        url: '/ylLevelMeasure/findArticleDetail',
        method: 'post',
        data
    })
}
// 更新文章
export const ylLevelMeasureupdateArticle = (data) => {
    return request({
        url: '/ylLevelMeasure/updateArticle',
        method: 'post',
        data
    })
}
// 修改状态文章
export const updateStatus = (data) => {
    return request({
        url: '/ylLevelMeasure/updateStatus',
        method: 'post',
        data
    })
}
// 删除文章
export const ylLevelMeasuredelArticleById = (data) => {
    return request({
        url: '/ylLevelMeasure/delArticleById',
        method: 'post',
        data
    })
}
// rer文章end
// 文章管理 end
// 查询通知列表
export const findUserMessagePage = (data) => {
    return request({
        url: '/ylServiceReply/findUserMessagePage',
        method: 'post',
        data
    })
}
export const addUserMessage = (data) => {
    return request({
        url: '/ylServiceReply/addUserMessage',
        method: 'post',
        data
    })
}
// 日志查询
export const findUserLog = (data) => {
    return request({
        url: '/ylUserLog/findUserLog',
        method: 'post',
        data
    })
}
// 小程序审核开关
export const findHideStatus = (params) => {
    return request({
        url: '/ylLevelVideo/findHideStatus',
        method: 'get',
        params
    })
}
// 更新序审核开关
export const updateHideStatus = (data) => {
    return request({
        url: '/ylLevelVideo/updateHideStatus',
        method: 'post',
        data
    })
}
